#include <bits/stdc++.h>

using namespace std;

const int MAXN = 2e5+10;
const int mod = 1e9+7;

typedef long long ll;
typedef pair<int,int> pii;

#define fi first
#define se second

int a[MAXN],b[MAXN],n,m,cnt,x[MAXN];
ll f[MAXN],ans,tr[MAXN];
pii p[MAXN];

void add(int x,int y){x++;for(;x<=cnt;x+=x&-x) (tr[x] += y)%=mod;}
ll query(int x){x++;ll res = 0;for(;x;x-=x&-x) (res += tr[x])%=mod;return res;}

bool cmp (pii x,pii y){
	if(x.fi == y.fi) return x.se > y.se;
	return x.fi < y.fi;
}

int main (){
	scanf("%d %d",&n,&m);
	for(int i = 1;i <= n;i++) scanf("%d",&a[i]);
	for(int i = 1;i <= m;i++) scanf("%d",&b[i]);
	for(int i = 1;i <= n;i++){
		if(a[i] <= b[1] || a[i] >= b[m]) continue;
		int pos = lower_bound(b+1,b+m+1,a[i])-b;
		if(b[pos-1] == a[i] || b[pos] == a[i]) continue;
		p[++cnt] = pii(a[i]-b[pos-1],b[pos]-a[i]);
		x[cnt] = b[pos]-a[i];
	}
	sort(x+1,x+cnt+1); int tot = unique(x+1,x+cnt+1)-x-1;
	for(int i = 1;i <= cnt;i++) p[i].se = lower_bound(x+1,x+tot+1,p[i].se)-x;
	sort(p+1,p+cnt+1,cmp); cnt = unique(p+1,p+cnt+1)-p-1;
	f[0] = 1;add(0,1);;
	for(int i = 1;i <= cnt;i++){
		f[i] = query(p[i].se-1)%mod;
		add(p[i].se,f[i]);
	}
	for(int i = 0;i <= cnt;i++) (ans += f[i])%=mod;
	printf("%lld\n",ans);
	return 0;
}
